﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LeMigue.Scrum.Iterface.Service;
using LeMigue.Framework.Utils;

namespace LeMigue.TeamPortal.Base.Service
{
    public class FactoryService
    {
        private static ITeamService _teamService = null;
        public static ITeamService TeamService
        {
            get {
                if (_teamService == null)
                    _teamService = DIUnity.GetInstance<ITeamService>("TeamService"); ;

                return _teamService;
            }

        }

        private static ITaskService _taskService = null;
        public static ITaskService TaskService
        {
            get
            {
                if (_taskService == null)
                    _taskService = DIUnity.GetInstance<ITaskService>("TaskService"); ;

                return _taskService;
            }

        }

        private static ISprintService _sprintService = null;
        public static ISprintService SprintService
        {
            get
            {
                if (_sprintService == null)
                    _sprintService = DIUnity.GetInstance<ISprintService>("SprintService"); ;

                return _sprintService;
            }

        }
        private static IProjectService _projectService = null;
        public static IProjectService ProjectService
        {
            get
            {
                if (_projectService == null)
                    _projectService = DIUnity.GetInstance<IProjectService>("ProjectService"); ;

                return _projectService;
            }
        }
        private static IMemberService _memberService = null;
        public static IMemberService MemberService
        {
            get
            {
                if (_memberService == null)
                    _memberService = DIUnity.GetInstance<IMemberService>("MemberService"); ;

                return _memberService;
            }
        }

        private static IIterationService _iterationService = null;
        public static IIterationService IterationService
        {
            get
            {
                if (_iterationService == null)
                    _iterationService = DIUnity.GetInstance<IIterationService>("IterationService"); ;

                return _iterationService;
            }
        }

        private static IItemBacklogService _itemBacklogService = null;
        public static IItemBacklogService ItemBacklogService
        {
            get
            {
                if (_itemBacklogService == null)
                    _itemBacklogService = DIUnity.GetInstance<IItemBacklogService>("ItemBacklogService"); ;

                return _itemBacklogService;
            }
        }

        private static IBugService _bugService = null;
        public static IBugService BugService
        {
            get
            {
                if (_bugService == null)
                    _bugService = DIUnity.GetInstance<IBugService>("BugService"); ;

                return _bugService;
            }
        }
    }
}
